define(function () {

    var self,
        app = win.app,
        menus = [],menuList=[]
        list = {
        'hot': [],
        'fw': ["fwpj/fwpj", "fwsl/fwsl", "fwpg/fwpg", "fwzp/fwzp"],
        'pj': ["fwpj/fwpj",'sppj/sppj']
        }
    ;


    app.newModule({
        init: function () {
            self = this;

            self._super({
                _tag: 'p_modoule',
                _readyBefore: function () {
                    //最先执行
                    self.mData = {
                        authData: [],
                        obj: {
                            dqs: 0,
                            wfh: 0
                        },
                    };
                    menus.pushArray(app.userInfos.auths);
                }
            }, win);

        },
        dataDrawing: function () {
            //执行数据渲染
            new Vue({
                el: doc.getElementById('content'),
                data: {
                    menus: menuList
                },
                methods: {
                    openWindow: function (url) {
                        app.openPage({
                            src: url + '.html'
                        });
                    },
                }
            });
        },
        _ready: function () {
            list[self._pageParameters.typeIndex].forEach(function (url) {
                menus.iFilter({
                    o: {
                        URL: url
                    },
                    cb: function (arr, i) {
                        if (i > 0)
                            menuList.push(arr[0])
                    }
                });
            })
            self.dataDrawing();
        },
        _lazy: function () {
            this._super();
            require(['wx-iconfont'], $.noop);
        }
    });

});